<html>
<head><meta charset="utf-8"><title>Comparing `CrateGraph` · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Comparing.20.60CrateGraph.60.html">Comparing `CrateGraph`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="244547161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Comparing%20%60CrateGraph%60/near/244547161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Comparing.20.60CrateGraph.60.html#244547161">(Jul 01 2021 at 10:43)</a>:</h4>
<p>Looking at <a href="https://github.com/rust-analyzer/rust-analyzer/pull/8363/files">https://github.com/rust-analyzer/rust-analyzer/pull/8363/files</a>, I'm wondering if we really need to compare <code>CrateData</code> or <code>CrateGraph</code> values. Removing the <code>PartialEq</code> doesn't break anything.</p>



<a name="244554983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Comparing%20%60CrateGraph%60/near/244554983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Comparing.20.60CrateGraph.60.html#244554983">(Jul 01 2021 at 12:04)</a>:</h4>
<p>We def should have the logic to <em>not</em> update the inputs after no-op change to Cargo.toml. I think we do that at the level of ProjectWorkspace though?</p>



<a name="244555456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Comparing%20%60CrateGraph%60/near/244555456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Comparing.20.60CrateGraph.60.html#244555456">(Jul 01 2021 at 12:09)</a>:</h4>
<p>Yeah, I think we compare the <code>ProjectWorkspace</code>s and <code>BuildDataResult</code>s in <code>reload.rs</code></p>



<a name="244558013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Comparing%20%60CrateGraph%60/near/244558013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Comparing.20.60CrateGraph.60.html#244558013">(Jul 01 2021 at 12:34)</a>:</h4>
<p>does salsa not do that?</p>



<a name="244564338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Comparing%20%60CrateGraph%60/near/244564338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Comparing.20.60CrateGraph.60.html#244564338">(Jul 01 2021 at 13:21)</a>:</h4>
<p>I think salsa used to do this check in <code>set_</code>, but then it got removed</p>



<a name="244564811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Comparing%20%60CrateGraph%60/near/244564811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Comparing.20.60CrateGraph.60.html#244564811">(Jul 01 2021 at 13:25)</a>:</h4>
<p>I guess that makes sense, usually you only set inputs if they have in fact changed</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>